import User from './User'
import Resource from './Resource'
import MResource from './MResource'
import Role from './Role'
import Settings from './Settings'
import ImageSearchConfig from './ImageSearchConfig'
import Membership from './Membership'
import Apps from './Apps'
import Products from './Products'
import Message from './Message'
export {
  User,
  Resource,
  MResource,
  Role,
  Settings,
  ImageSearchConfig,
  Membership,
  Apps,
  Message,
  Products
}

class Urls {
  // 查找图库一级分类
  getImageStorageCategoryPage () {
    return {
      url: `${window.$env.serverUrl()}/image-storage-classify/page-list`,
      meta: {
        requiresAuth: true
      }
    }
  }
  updateImageStorageCategory (id) {
    return {
      url: `${window.$env.serverUrl()}/image-storage-classify/${id}`,
      meta: {
        requiresAuth: true
      }
    }
  }
  deleteImageStorageCategory (id) {
    return {
      url: `${window.$env.serverUrl()}/image-storage-classify/${id}`,
      meta: {
        requiresAuth: true
      }
    }
  }
  exportImageStorageCategory (id) {
    return {
      url: `${window.$env.serverUrl()}/image-storage-classify/export-to-local/${id}`,
      meta: {
        requiresAuth: true
      }
    }
  }
  publishImageStorageCategory (id) {
    return {
      url: `${window.$env.serverUrl()}/image-storage-classify/export-to-store/${id}`,
      meta: {
        requiresAuth: true
      }
    }
  }
  saveImageStorageCategory () {
    return {
      url: `${window.$env.serverUrl()}/image-storage-classify/save`,
      meta: {
        requiresAuth: true
      }
    }
  }
  getImageStorageCategoryZtree () {
    return {
      url: `${window.$env.serverUrl()}/image-storage-classify/ztree`,
      meta: {
        requiresAuth: true
      }
    }
  }
  // 查找图库图片列表
  getImageStoragePage () {
    return {
      url: `${window.$env.serverUrl()}/image-storage/page-list`,
      meta: {
        requiresAuth: true
      }
    }
  }
  // 查找图库图片分类列表
  getImageStorageAndClassifyList (id) {
    return {
      url: `${window.$env.serverUrl()}/image-storage/${id}/class-list`,
      meta: {
        requiresAuth: true
      }
    }
  }
  updateImageStorage (id) {
    return {
      url: `${window.$env.serverUrl()}/image-storage/${id}`,
      meta: {
        requiresAuth: true
      }
    }
  }
  deleteImageStorage (id) {
    return {
      url: `${window.$env.serverUrl()}/image-storage/${id}`,
      meta: {
        requiresAuth: true
      }
    }
  }
  saveImageStorage () {
    return {
      url: `${window.$env.serverUrl()}/image-storage/save`,
      meta: {
        requiresAuth: true
      }
    }
  }
  deleteImageStorageForBatch () {
    return {
      url: `${window.$env.serverUrl()}/image-storage/batch`,
      meta: {
        requiresAuth: true
      }
    }
  }
  saveImageStorageForBatch () {
    return {
      url: `${window.$env.serverUrl()}/image-storage/batch-save`,
      meta: {
        requiresAuth: true
      }
    }
  }
  // 查找图库一级分类
  getImageStorageCategoryList () {
    return {
      url: `${window.$env.serverUrl()}/image-storage/image-storage-category`,
      meta: {
        requiresAuth: false
      }
    }
  }
  // 查找图库下级分类
  getImageStorageCategory (id) {
    return {
      url: `${window.$env.serverUrl()}/image-storage/image-storage-category/${id}`,
      meta: {
        requiresAuth: false
      }
    }
  }
  // 查找图库下级分类
  getChildImageStorageCategoryList (id) {
    return {
      url: `${window.$env.serverUrl()}/image-storage/parent-list/${id}`,
      meta: {
        requiresAuth: false
      }
    }
  }
  // 判断图库分类是否有下级分类
  existChildImageStorageCategory () {
    return {
      url: `${window.$env.serverUrl()}/image-storage/exist-parent`,
      meta: {
        requiresAuth: false
      }
    }
  }
  // 查找图库图片列表
  getImageStorageList () {
    return {
      url: `${window.$env.serverUrl()}/image-storage/image-storage`,
      meta: {
        requiresAuth: false
      }
    }
  }

  // 以图搜索图
  getImageSearch () {
    return {
      url: `${window.$env.serverUrl()}/image/similar-image`,
      meta: {
        requiresAuth: false
      }
    }
  }

  // 删除百度图库中的图
  deleteImageSearch (id) {
    return {
      url: `${window.$env.serverUrl()}/image/${id}`,
      meta: {
        requiresAuth: true
      }
    }
  }
  // 删除百度图库中的图
  deleteImageSearchForBatch () {
    return {
      url: `${window.$env.serverUrl()}/image/batch`,
      meta: {
        requiresAuth: true
      }
    }
  }

  // 找图管理
  getChartFindingRecordPage () {
    return {
      url: `${window.$env.serverUrl()}/chart-finding-record/page-list`,
      meta: {
        requiresAuth: true
      }
    }
  }
  updateChartFindingRecord (id) {
    return {
      url: `${window.$env.serverUrl()}/chart-finding-record/${id}`,
      meta: {
        requiresAuth: true
      }
    }
  }
  deleteChartFindingRecord (id) {
    return {
      url: `${window.$env.serverUrl()}/chart-finding-record/${id}`,
      meta: {
        requiresAuth: true
      }
    }
  }
  saveChartFindingRecord () {
    return {
      url: `${window.$env.serverUrl()}/chart-finding-record/save`,
      meta: {
        requiresAuth: true
      }
    }
  }

  similarImageByChartFinding () {
    return {
      url: `${window.$env.serverUrl()}/chart-finding-record/similar-image`,
      meta: {
        requiresAuth: true
      }
    }
  }

  // 查找图库图片分类列表
  getChartFindingAndClassifyList (id) {
    return {
      url: `${window.$env.serverUrl()}/chart-finding-record/${id}/class-list`,
      meta: {
        requiresAuth: true
      }
    }
  }

  // 查找图库图片分类列表
  getChartFindingRecordReport01 () {
    return {
      url: `${window.$env.serverUrl()}/chart-finding-record/report01`,
      meta: {
        requiresAuth: true
      }
    }
  }

  // 查找当前用户
  getCurrentUser () {
    return {
      url: `${window.$env.serverUrl()}/current-user`,
      meta: {
        requiresAuth: true
      }
    }
  }
  // 查找图库一级分类
  getDictionarys () {
    return {
      url: `${window.$env.serverUrl()}/dictionary/dictionary-all`,
      meta: {
        requiresAuth: true
      }
    }
  }
}

export default new Urls()
